
package com.adobe.serialization.json
{

	public class JSONParseError extends Error
	{

		/** The location in the string where the error occurred */
		private var _location:int;

		/** The string in which the parse error occurred */
		private var _text:String;

		/**
		 * Constructs a new JSONParseError.
		 *
		 * @param message The error message that occured during parsing
		 */
		public function JSONParseError(message:String="", location:int=0, text:String="")
		{
			super(message);
			//name = "JSONParseError";
			_location=location;
			_text=text;
		}

		/**
		 * Provides read-only access to the location variable.
		 *
		 * @return The location in the string where the error occurred
		 */
		public function get location():int
		{
			return _location;
		}

		/**
		 * Provides read-only access to the text variable.
		 *
		 * @return The string in which the error occurred
		 */
		public function get text():String
		{
			return _text;
		}
	}

}
